import React, { Component } from 'react';

/*pages*/
import Index from './pages/Index';
import Detail from './pages/Detail';


import './App.less';

import {Route,BrowserRouter,HashRouter} from 'react-router-dom';

  //class定义组件
class App extends Component {
    render() {
        //basename="/reactjs-app-demo/"
        return (     
        <BrowserRouter basename="/reactjs-app-demo/">            
            <div className="page-container">   
            <Route exact path="/" component={Index}/>
            <Route path="/detail/:id" component={Detail}/>
            </div>
        </BrowserRouter>
        );
  }
}

export default App;
